////////////////////////////////////////////////////////////////////////////////
//adcin will take two arguments from user:- channel for Analog Input and Band //
//width option and return an unsigned integer.                                //
//  Assumptions:-                                                             //
//  *Ports' Direction(setting TRIS register values) will be done by user.     //
//  *User will take care for the value of PBADEN bit in CONFIG3H register.    //
//  *PCFG values(port select) will be done accordingly by the code based on   //
//   the channel_select value.                                                //
//  *Result - 10 bits digital value will be right justified(8 bits in ADRESL, //
//   2 bits in ADRESH).                                                       //
//  *Acquisition time(Tacq) and Conversion Clock Time(Tad) are mainatained in //
//   the code and user don't have to worry about them.                        //
//                                                                            //
//  adcin function will return a 16 bit digital value(integer) in which the   //
//  Lower 10 bits would be the digital conversion of the analog input user    //
//  is giving.                                                                //
////////////////////////////////////////////////////////////////////////////////


#include <p18f4550.h>
#define _XTAL_FREQ 48000000
unsigned int adcin(unsigned char channel_select, unsigned char band_option);

